function [sysz, Vp0]=linearizeAndDiscretizeCoupledTanks(L10, L20, Ts)
g = 981; % cm / s^2
A1 = 15.518; % cm^2
A2 = 15.518; % cm^2
a1 = 0.1781; % cm^2
a2 = 0.1781; % cm^2
Km = 4.6; % cm^3 / (s * V)

p = -a1 / A1;
q = 2 * g;
r = Km / A1;
s = -a2 / A2;

a11 = (p * q / 2) * (1 / sqrt(q * L10));
a12 = 0;
a21 = -(p * q / 2) * (1 / sqrt(q * L10));
a22 = (s * q / 2) * (1 / sqrt(q * L20));

b1 = 5 * r;
b2 = 0;

c1 = 0;
c2 = 1;

A = [a11 a12; a21 a22];
B = [b1; b2];
C = [c1 c2];
D = [];

Vp0 = -p * sqrt(q * L10) / (5  * r);

sys = ss(A, B, C, D);

sysz = c2d(sys, Ts, 'zoh');
end